﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using QLTV_BLL;
using QLTV_Public;

namespace QLTV_GiaoDien
{
    public partial class uc_DanhSachMuonTaiLieu : DevExpress.XtraEditors.XtraUserControl
    {
        public uc_DanhSachMuonTaiLieu()
        {
            InitializeComponent();
        }
        
        private void uc_DanhSachMuonTaiLieu_Load(object sender, EventArgs e)
        {
            splitContainerControl1.Hide();
        }
        MuonTra_BLL muonTra_bll = new MuonTra_BLL();
       
        private void bbi_DSMTL_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            gridControl1.DataSource = muonTra_bll.Load_tbl_MuonTra();
            //gridControl1.ExportToXlsx(@"D:\");
        }

        private void bbi_DSDaTraTl_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {   
            gridControl1.DataSource = muonTra_bll.Load_MuonTra_DaTra();
            
        }

        private void bbi_DSDangMuonTL_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {    
            
            gridControl1.DataSource = muonTra_bll.Load_MuonTra_DangMuon();
            
        }

        private void bbi_TimKIem_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            splitContainerControl1.Show();
        }

        private void btn_Thoat_Click(object sender, EventArgs e)
        {
            splitContainerControl1.Hide();
        }

        private void bbi_Refresh_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            uc_DanhSachMuonTaiLieu_Load(sender,e);
        }

        private void textEdit1_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!Char.IsControl(e.KeyChar) && !Char.IsDigit(e.KeyChar))
                e.Handled = true;
        }


    }
}
